package com.sgb.kjwl.view.ui.adapter.pick;

import android.content.Context;
import android.widget.TextView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.zhaocai.entity.PickExpertDetailEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class PickExpertDetailMajorViewAdapter extends BaseRecycleAdapter<PickExpertDetailEntity.Majors> {

    public PickExpertDetailMajorViewAdapter(Context context, List<PickExpertDetailEntity.Majors> data) {
        super(context, R.layout.item_pick_expert_detial_major_view, data);
    }


    @Override
    public void convert(ItemViewHolder holder, final PickExpertDetailEntity.Majors entity) {
        holder.setBinding(BR.viewModel, entity);
        TextView itemTitleName = holder.getItem().findViewById(R.id.item_title_name);
        TextView itemTitleTime = holder.getItem().findViewById(R.id.item_title_time);

        itemTitleName.setText("专业" + (holder.getIndex_position() + 1));
        itemTitleTime.setText("从事该专业\n起始年份");
    }

}
